
<!-- body onload="document.registration.userid.focus();"-->
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
<%@taglib prefix="error" uri="/WEB-INF/tags/ErrorTag.tld"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<%@taglib prefix="user" uri="/WEB-INF/tags/UserDescriptor.tld"%>

<div>
	<h2>Search friends</h2>

	<!-- error container -->
	<div class="error-style">
		<error:errors error="${param.error}"></error:errors>
	</div>
	<div id="image_and_form">
		<div id="fletcher">
			<img src="img/fletcher_search.jpg" alt="fletcher is gonna find out"
				id="fletcher" />
		</div>

		<div id="form">
			<form id="searchbox" method="get" action="./proceedNormalFriendSearch">
				<input id="search" type="text" name="query"
					placeholder="Search for someone?"> <input
					id="search_button" type="submit" value="Search">
			</form>
		</div>

	</div>


	<div id="results">

		<h2>Goood Morning !</h2>

		<c:if test="${fn:length(userResultMap) > 0}">

			<c:forEach items="${userResultMap}" var="map">
				<br />
				<div id="userDisplay">
					<user:display username="${map['username']}"
						surname="${map['surname']}" name="${map['name']}"
						email="${map['email']}" category="${map['category']}"
						city="${map['city']}" image="${map['image']}" 
						ability="${map['matched_ability']}" 
						/>
				</div>
				<br />
				<br />
			</c:forEach>
		</c:if>

	</div>


	<c:if test="${fn:length(userResultMap) == 0}">

		<c:if test="${(not empty param.query)}">
			<h2>Mss. Fletcher did not found any result, the user is probably
				death</h2>
		</c:if>
	</c:if>
</div>





